//
//  HSDSpiderMacro.h
//  GoldenCard
//
//  Created by 正合适 on 2018/3/21.
//  Copyright © 2018年 合时代. All rights reserved.
//

#ifndef HSDSpiderMacro_h
#define HSDSpiderMacro_h

// spiderman的运行线程名称
#define kSpidermanThreadName @"com.hsd.spiderman.mainthreadname"

// KeyChainServer
#define keyChainServer @"com.hsd.spiderman.keychain"

// UUID储存key
#define kSpidermanUUIDCacheKey @"com.hsd.spiderman.UUIDCacheKey"

// 用户信息电话key
#define kUserPhone @"phone"

// ----- url -----
// 获取外网ip信息
#define kNetInfoApi @"http://ip.taobao.com/service/getIpInfo.php?ip=myip"
#define kUploadDataApi @"http://collect.heshidai.com/api/collect/info"

/**
 行为结束的方式

 - RouteEndType_BackStartPage: 返回到起始页
 - RouteEndType_Background: 进入后台或者被结束进程
 */
typedef NS_ENUM(NSUInteger, RouteEndType) {
    RouteEndType_BackStartPage,
    RouteEndType_Background,
};

/**
 网络类型

 - NetworkType_Unknow: 未知网络
 - NetworkType_Mobile: 手机网络
 - NetworkType_Wifi: wifi
 - NetworkType_Wifi: 未连接
 */
typedef NS_ENUM(NSUInteger, NetworkType) {
    NetworkType_Unknow = 1,
    NetworkType_Mobile,
    NetworkType_Wifi,
    NetworkType_Unconnect,
};

/**
 上传策略

 - UploadStrategy_UpFirst: 上传优先，失败了就缓存
 - UploadStrategy_CacheFirst: 缓存优先,从缓存中获取的数据，如果成功了就删除数据
 */
typedef NS_ENUM(NSUInteger, UploadStrategy) {
    UploadStrategy_UpFirst = 1,
    UploadStrategy_CacheFirst,
};

#endif /* HSDSpiderMacro_h */
